#pragma once

#include <memory>
#include <Common/Common.h>
using namespace std;

class CGcpClientEvent;
class CGcpProxy
{
public:
    CGcpProxy(CGcpClientEvent *pClient);
    ~CGcpProxy();

public:
    Bool Request(LPCSTR lpszUri, const string &content, LPCSTR lpszContentType);
    Bool Respond(const string &content, LPCSTR lpszContentType);
    Bool IsConnected() const;
    void Close();
    string GetPeerAddress() const;

private:
    CGcpClientEvent*        m_pClient;
    string                  m_strPeerAddress;
};

typedef shared_ptr<CGcpProxy> CGcpProxyPtr;
